<?php

namespace app\admin\controller;

use think\Controller;

require_once 'php-barcode.php';

class Qr extends Controller
{
    //
    public function index()
    {
        $im    = imagecreatetruecolor(200, 66);
        $black = ImageColorAllocate($im, 0x00, 0x00, 0x00);
        $white = ImageColorAllocate($im, 0xff, 0xff, 0xff);
        imagefilledrectangle($im, 0, 0, 200, 66, $white);
        $data = Barcode::gd($im, $black, 100, 33, 0, "code128", "nxm520", 2, 50);
        header('Content-Type: image/gif');
        imagegif($im, '777.gif');
//        unlink('simpletext.gif');
    }

}
